Skip to content

Report Houdini DEX transactions through autobot - #515

Merged
j0ntz merged 1 commit into
masterfrom
jon/houdini-dex-autobot
Nov 16, 2026
Merged

j0ntz merged 1 commit into
masterfrom
jon/houdini-dex-autobot

Conversation

@j0ntz

@j0ntz j0ntz commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

EdgeApp/edge-autobot-server#7 (the /api/houdini endpoint) must be deployed with the Houdini credentials, and the Edge build config must pass its address as the new optional autobotUrl init option. Without autobotUrl the plugin confirms directly, as it does on master. This PR can therefore ship first.

Description

Asana task

A Houdini DEX order starts only once dex/confirmTx names its transaction. The plugin made that call itself after broadcast. Closing the app in that window left the order unstarted with the funds already sent.

After broadcast, when autobotUrl is set, the approval PUTs { orderId, txHash } to autobot's /api/houdini, and autobot retries the confirmation until Houdini accepts or refuses it. When autobot answers with anything but a 2xx, the call throws, or it takes longer than 10 seconds, the plugin calls dex/confirmTx directly. Neither path throws after broadcast.

Testing:

  • Unit tests cover the autobot report body, the direct fallback when autobot refuses the report, when the call throws and when no autobotUrl is configured, retry and no-retry of the direct call, and that the send completes when no confirmation lands.
  • In the app on an iOS simulator, before the review changes added the timeout and made autobotUrl optional, against a local autobot talking to the real Houdini API: an ETH to MON DEX swap (Mayan route) reached the success scene and the app was killed right after broadcast. Autobot confirmed the order on its first attempt and Houdini shows it finished.

Found while testing, not changed here: makeDexSwapOrder rejects Debridge DEX orders. The deBridge contract adds a fixed 0.001 ETH fee to the transaction value, which trips the value > nativeAmount check. The error is not caught per route. The next DEX route (Mayan) is never tried, and the user sees "No enabled exchanges support ETH to MON".

Test evidence

92ec64d
Report Houdini DEX transactions through autobot
2026-10-25

1. houdini dex quote

2. houdini dex swap success

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-25T10:27:33.229018Z
We couldn’t complete this review. Comment @codex review to try again.
92ec64d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@peachbits peachbits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the app's own dex/confirmTx once autobot takes the report settles the task's open question, since QA on the task (case C4) found Houdini answers a second confirm for the same order with 404. Both report paths catch and log through log.warn, so approve() cannot throw after broadcast and the bridgeless result cache isn't needed here. Only quotes with a dexOrderId report.

I also ran this diff on current master. #512 and #522 left confirmDexTx and the approve wrapper alone, and the houdini tests pass (55) with tsc clean. On rebase the CHANGELOG line moves to the current ## Unreleased. If #523 lands first, its DEX test scripts drop nativeAddress and its scriptedFetch gains an info-server branch, so the autobot lines here move with them.

The asks on EdgeApp/edge-autobot-server#7 change what a 200 from autobot guarantees. Nothing here waits on them: until that route exists the PUT gets a 404 and this falls back to the direct confirm.

Comment thread src/swap/central/houdini.ts Resolved
Comment thread src/swap/central/houdini.ts Resolved
Comment thread src/swap/central/houdini.ts Resolved
Comment thread CHANGELOG.md Resolved
@j0ntz

j0ntz commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

All four threads are addressed in cf56fff, with 55 houdini tests passing and tsc clean. The autobot path needs autobotUrl in the GUI's houdini initOptions. Without it this plugin confirms directly, which makes this PR safe to ship before that config change or before the autobot PR deploys.

A DEX order starts on Houdini's side only once dex/confirmTx names its
transaction. The app made that call itself after broadcast, and closing
the app in that window left the order unstarted with the funds already
sent. The approval now hands the order id and tx hash to autobot, which
retries the confirmation until Houdini accepts or refuses it. When autobot
cannot take the report, the app confirms directly as before.
@j0ntz
j0ntz force-pushed the jon/houdini-dex-autobot branch from cf56fff to 8ded2b0 Compare November 16, 2026 21:14
@j0ntz
j0ntz enabled auto-merge November 16, 2026 21:14
@j0ntz
j0ntz merged commit b08940b into master Nov 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants